﻿<Window x:Class="TeamBuildBunnyConfiguration.Views.BuildBunnySettings"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Team Build Bunny Settings" Width="550" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" ResizeMode="NoResize" SizeToContent="Height" WindowStartupLocation="CenterScreen" WindowStyle="ThreeDBorderWindow"
    xmlns:m="clr-namespace:TeamBuildBunnyConfiguration.Models">
	<Window.Background>
		<LinearGradientBrush>
			<GradientStop Color="#FF2B7720" Offset="4"/>
			<GradientStop Color="#FFFFFFFF" Offset="0"/>
		</LinearGradientBrush>
	</Window.Background>
	<StackPanel Margin="8">
		<Grid Margin="0,0,0,8">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="151"/>
				<ColumnDefinition Width="8" />
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="8" />
				<ColumnDefinition Width="86" />
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="28" />
			</Grid.RowDefinitions>
			<Label Height="28" Grid.Column="0" HorizontalContentAlignment="Right" FontWeight="Bold" Content="Team Foundation Server:" />
			<TextBox Grid.Column="2" Text="{Binding Path=TfsUri, Mode=OneWay}" IsReadOnly="True" TextWrapping="NoWrap" />
			<Button Command="m:TfsCommands.SelectServer" Grid.Column="4" Content="Select..."/>
		</Grid>
		<GroupBox Header="Nabaztag" Margin="0,0,0,16" Padding="4">
			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="111"/>
					<ColumnDefinition Width="8" />
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="8" />
					<ColumnDefinition Width="135" />
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="28" />
					<RowDefinition Height="8" />
					<RowDefinition Height="28" />
					<RowDefinition Height="8" />
					<RowDefinition Height="28" />
					<RowDefinition Height="8" />
					<RowDefinition Height="28" />
					<RowDefinition Height="8" />
					<RowDefinition Height="28" />
				</Grid.RowDefinitions>
				<Label HorizontalContentAlignment="Right" Grid.Column="0" Grid.Row="0" FontWeight="Bold" Content="Serial Number:" />
				<TextBox VerticalContentAlignment="Center" Grid.Column="2" Grid.Row="0" TextWrapping="NoWrap">
					<Binding Path="SerialNumber" UpdateSourceTrigger="PropertyChanged">
						<Binding.ValidationRules>
							<ExceptionValidationRule />
						</Binding.ValidationRules>
					</Binding>
				</TextBox>
				<Label HorizontalContentAlignment="Left" Grid.Column="4" Grid.Row="0"  Content="e.g. 1234A567B89C" FontStyle="Italic" Foreground="Gray" />
				<Label HorizontalContentAlignment="Right" Grid.Column="0" Grid.Row="2" FontWeight="Bold" Content="Token:" />
				<TextBox VerticalContentAlignment="Center" Grid.Column="2" Grid.Row="2" TextWrapping="NoWrap">
					<Binding Path="Token" UpdateSourceTrigger="PropertyChanged">
						<Binding.ValidationRules>
							<ExceptionValidationRule />
						</Binding.ValidationRules>
					</Binding>
				</TextBox>
				<Label HorizontalContentAlignment="Left" Grid.Column="4" Grid.Row="2" Content="e.g. 1234567890" FontStyle="Italic" Foreground="Gray" />
				<Label HorizontalContentAlignment="Right" Grid.Column="0" Grid.Row="4" FontWeight="Bold" Content="Language:"/>
				<ComboBox Grid.Column="2" Grid.Row="4" ItemsSource="{Binding Cultures}" SelectedItem="{Binding Culture}"  />
				<Label HorizontalContentAlignment="Right" Grid.Column="0" Grid.Row="6" FontWeight="Bold" Content="Voice:" />
				<ComboBox Grid.Column="2" Grid.Row="6" ItemsSource="{Binding Voices}" SelectedItem="{Binding Voice}"  />
				<Button Grid.Column="4" Grid.Row="8" Command="m:NabaztagCommands.Test" Content="Send Test Message" />
			</Grid>
		</GroupBox>
		<GroupBox Header="Event Subscriptions" Margin="0,0,0,16" Padding="4">
			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="151"/>
					<ColumnDefinition Width="8" />
					<ColumnDefinition Width="50*" />
					<ColumnDefinition Width="8" />
					<ColumnDefinition Width="50*" />
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="28" />
					<RowDefinition Height="8" />
					<RowDefinition Height="28" />
				</Grid.RowDefinitions>
				<Label HorizontalContentAlignment="Right" FontWeight="Bold" Content="Build Completion Events:" Grid.Column="0" />
				<Button Command="m:TfsCommands.SubscribeToBuildCompletionEvent" Content="Subscribe" Grid.Column="2" />
				<Button Command="m:TfsCommands.UnsubscribeFromBuildCompletionEvent" Content="Unsubscribe" Grid.Column="4" />
				<Label HorizontalContentAlignment="Right" FontWeight="Bold" Content="Checkin Events:" Grid.Column="0" Grid.Row="2" />
				<Button Command="m:TfsCommands.SubscribeToCheckInEvent" Content="Subscribe" Grid.Column="2" Grid.Row="2" />
				<Button Command="m:TfsCommands.UnsubscribeFromCheckInEvent" Content="Unsubscribe" Grid.Column="4" Grid.Row="2" />
			</Grid>
		</GroupBox>
		<StackPanel Orientation="Horizontal" Height="28" HorizontalAlignment="Right">
			<Button Width="90" Command="ApplicationCommands.Save" Content="Save"/>
			<Button Margin="8,0,0,0" Width="90" Command="ApplicationCommands.Close" Content="Close"/>
		</StackPanel>
	</StackPanel>
</Window>
